import { Button } from 'antd';
import { PageContainer } from '@ant-design/pro-components';
import { useModel } from 'umi';
import React from 'react';

const CounterPage: React.FC = () => {
  const { count, increment, decrement } = useModel('count');
  return (
    <PageContainer>
      <p>count的值是：{count}</p>
      <Button onClick={() => increment()}>+</Button>
      <Button onClick={() => decrement()}>-</Button>
    </PageContainer>
  );
};

export default CounterPage;
